using System.Collections.Generic;
using HBCode.BusinessLogic.Base;

namespace HBCode.BusinessLogic.Entities
{
    public class Category : EntityBase
    {
        public Category()
        {
            this.Products = new List<Product>();
        }

        private long _CategoryID;
        public long CategoryID
        {
            get
            {
                return _CategoryID;
            }
            set
            {
                if (_CategoryID == value)
                    return;
                OnPropertyChanging("CategoryID");
                _CategoryID = value;
                OnPropertyChanged("CategoryID");
            }
        }

        private string _CategoryName;
        public string CategoryName
        {
            get
            {
                return _CategoryName;
            }
            set
            {
                if (_CategoryName == value)
                    return;
                OnPropertyChanging("CategoryName");
                _CategoryName = value;
                OnPropertyChanged("CategoryName");
            }
        }

        private ICollection<Product> _Products;
        public virtual ICollection<Product> Products
        {
            get
            {
                return _Products;
            }
            set
            {
                if (_Products == value)
                    return;
                OnPropertyChanging("Products");
                _Products = value;
                OnPropertyChanged("Products");
            }
        }
    }
}

